/*
 * @Description: 语法
 * @Author: rendc
 * @Date: 2022-06-07 09:35:13
 * @LastEditors: rendc
 * @LastEditTime: 2022-06-07 15:09:27
 */

// 启用严格模式
// "use strict";

var a = "1";
var a = 3;

var A = 2;

console.log('🤡 CC - a', a);
console.log('🤡 CC - A', A);

var myCar = "夏利";
console.log('🤡 CC - myCar', myCar)
// var MyCar = "夏利";
console.log('🤡 CC - a', a)
console.log('🤡 CC - a', a > 0)

if (a > 0) {
  console.log("a>0")
}

var arr = []
var obj = {}
// var str
function test () {
  str = "String" // 在非严格模式下 这样可以声明一个全局变量
  console.log('🤡 CC - test - str', str)
}

// test()
// console.log('🤡 CC - test - str', str)


function testAge () {
  // var age;
  console.log('🤡 CC - test - age', age) // undefined
  var age = "22"; // age = "22";
  console.log('🤡 CC - test - age', age) // 22

}

// testAge()



